<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <button onclick="window.open()">open</button>
    <button onclick="window.open('http://www.jd.com')">JD</button>
    <button onclick="window.open('http://www.tmall.com','yy')">TM</button>
    <button onclick="window.open('http://www.tmall.com','','height=600,width=300')">TM(指定大小)</button>

    <button onclick="window.print()">打印</button>
</body>

    <script>
    
        window.name = 'yy';

        // console.dir(window);
        var obj = {name:"艳艳"};
        console.log(obj);
        console.log(window.obj);

        var a = 100;
        console.log(a);
        console.log(window.a);

        function demo(){
            console.log('呆毛...');
        }

        demo();
        window.demo();

        //alert() 警告框
        //var a = alert('警告');
        //console.log(a);//返回undefined
        //confirm()  确认框
        // var a =  confirm('确定么');
        // console.log(a);
        //确认返回true  取消返回false
        //prompt()  输入框
        //var a =prompt('银行卡密码');
        //console.log(a);
        //输入内容
        //取消 null



    </script>
</html>